<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>RELAX NG Pluggable Datatype Libraries</title>
</head>
<body>

<h1>RELAX NG Pluggable Datatype Libraries</h1>

<p>A vendor-independent Java interface for RELAX NG datatype libraries
has been developed by James Clark and KAWAGUCHI Kohsuke.  RELAX NG
datatype libraries should be interchangeable between RELAX NG
validators that support this interface.  The interface is hosted at
SourceForge in the <a
href="http://sourceforge.net/projects/relaxng">relaxng</a> project.
There is <a href="api/datatype/index.html">API documentation</a>.</p>

<p>In particular, the <a
href="http://www.thaiopensource.com/relaxng/jing.html">Jing</a>
validator now supports this interface.</p>

<p>The interface allows validators to find datatype libraries
dynamically at run-time.  In order for a validator to be able
to find a datatype library:</p>

<ul>

<li>the datatype library should be packaged as JAR file</li>

<li>the JAR file must be on the Java CLASSPATH</li>

<li>the JAR file must include additional metadata in the form of a
file
<code>META-INF/services/org.relaxng.datatype.DatatypeLibraryFactory</code>,
which must contain the name of the class that implements the interface
<code>org.relaxng.datatype.DatatypeLibraryFactory</code></li>

</ul>

<p>This will only work with JDK 1.2 or greater.  It will not work with
JDK 1.1.</p>

<p>The <a href="http://www.thaiopensource.com/download">main Jing
distribution</a> includes a sample in the <code>sample/datatype</code>
directory.</p>

<address>
<a href="mailto:jjc@jclark.com">James Clark</a>
</address>
</body>
</html>
